package thread;

class Thread_T2  implements Runnable{
	private int i;
	public void run(){
		for (int i = 0; i < 5; i++) {
			System.out.println(Thread.currentThread().getName()+" "+i);
		}
	}
	public static void main(String[] args) {
	for (int i = 0; i < 50; i++) {
		System.out.println(Thread.currentThread().getName()+" "+i);
		if (i==20) {
			Thread_T2 st=new Thread_T2();
			new Thread(st,"newThread1").start();
			new Thread(st,"newThread1").start();
		}
		
	}	
	}
}